<%@ page import="com.dzzw.Model.Admin" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix = "c" %>
<%
    List<Admin> list = (List<Admin>) session.getAttribute("FindAllAdmin");
    session.getAttribute("FindAllAdmin");
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>查询管理员信息</title>
    <link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <script src="../bootstrap-3.3.7-dist/js/jquery-3.5.1.min.js"></script>
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="../bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
        }

        /* 头部样式 */
        .header {
            background-color: #0d82f0;
            padding: 20px;
            text-align: center;
        }

        /* 链接 - 修改颜色 */
        .topnav a:hover {
            background-color: #ddd;
            color: black;
        }

        /* 创建三个不相等的列 */
        .column {
            float: left;
        }

        /* 左右两侧宽度 */
        .column.side {
            width: 20%;
        }

        /* 中间区域宽度 */
        .column.middle {
            width: 70%;
        }

        /* 列后面清除浮动 */
        .row:after {
            content: "";
            display: table;
            clear: both;
        }

        /* 响应式布局 - 宽度小于600px时设置上下布局 */
        @media screen and (max-width: 600px) {
            .column.side, .column.middle {
                width: 100%;
            }
        }
    </style>
</head>
<body>

<div class="header">
    <img src="../images/湘潭市人民政府.png" alt="">
</div>
<div class="col-md-12 column">
    <nav class="navbar navbar-default" role="navigation">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button> <a class="navbar-brand" href="AdminB/Admin.jsp">首页</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li>
                    <a href="SelectAllForumServlet">论坛管理</a>
                </li>
                <li>
                    <a href="SelectAllDetailServlet">投票管理</a>
                </li>
                <li>
                    <a href="SelectAllUMailBoxServlet">信箱管理</a>
                </li>
                <li>
                    <a href="SystemUser.jsp">系统用户管理</a>
                </li>
            </ul>
        </div>
    </nav>
</div>
<div class="row">
    <div class="column side">
        <div class="col-md-12 column" id="center">
            <div class="panel-group">
                <div class="panel panel-default" >
                    <div class="panel-heading">
                        <a class="panel-title" data-toggle="collapse">管理员可执行操作</a>
                    </div>
                    <div class="panel-collapse in">
                        <div class="panel-body">
                            <a href="AdminRegister.jsp">添加管理账户</a>
                        </div>
                        <div class="panel-body">
                            <a href="FindAllAdminServlet">查看管理账户</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 数据栏 -->
    <div class="column middle">
        <div class="col-md-12 column">
            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <td>管理员 ID</td>
                    <td>管理员账号</td>
                    <td>管理员姓名</td>
                    <td>管理员密码</td>
                    <td>管理操作</td>
                </tr>
                </thead>
                <c:forEach items="<%=list%>" var="admin">
                    <tbody>
                    <tr class="success">
                    <tr>
                        <td>${admin.admin_id}</td>
                        <td>${admin.admin_actnumber}</td>
                        <td>${admin.admin_name}</td>
                        <td>${admin.admin_password}</td>
                        <td>
                            <a href="AdminDeleteServlet?admin_id=${admin.admin_id}">删除</a>
                            <a href="AdminB/AdminModify.jsp?admin_id=${admin.admin_id}">修改密码</a>
                        </td>
                    </tr>
                    </tbody>
                </c:forEach>
            </table>
        </div>
    </div>
</body>
</html>
